<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>基础知识</title>
	<link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css"" rel="stylesheet">
	<link href="https://cdn.bootcdn.net/ajax/libs/animate.css/3.2.3/animate.css" rel="stylesheet">
    <link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="../../static/css/public.css" />
	<style type="text/css">
		li{
			text-indent: 2em;
			padding: 5px 0;
		}
	</style>
</head>
<body>
	<!-- 回到顶部 -->
	<div class="topBtn">
		<a href="#top">
			<i class="fa fa-long-arrow-up"></i>
		</a>
	</div>
	<!--右边内容-->
	<div id="app" class="main animated fadeInRight">
		<div class="shadow">
			<div class="Table" v-cloak id="top">
				<div class="TableRow" v-for="(el,index) in list">
					<a class="RowLeft" :href="'#'+el.id">{{el.name}}</a>
					<span class="RowRight">{{el.explain}}</span>
				</div>
			</div>
			<div>
				<h4 id="use">&lt;use&gt;</h4>
				<pre>
	&lt;svg viewBox="0 0 30 10" xmlns="http://www.w3.org/2000/svg"&gt;
	  &lt;circle id="myCircle" cx="5" cy="5" r="4"/&gt;
	
	  &lt;use href="#myCircle" x="10" y="0" fill="blue" /&gt;
	  &lt;use href="#myCircle" x="20" y="0" fill="white" stroke="blue" /&gt;
	&lt;/svg&gt;				
				</pre>
			</div>
			<div>
				<h4 id="g">&lt;g&gt;</h4>
				<p>
					将多个标签打组，在其他地方通过id直接调用
					不需要多次复写内容
				</p>
				<pre>
	&lt;svg width="300" height="100"&gt;
	  &lt;g id="myCircle"&gt;
	    &lt;text x="25" y="20"&gt;圆形&lt;/text&gt;
	    &lt;circle cx="50" cy="50" r="20"/&gt;
	  &lt;/g&gt;
	
	  &lt;use href="#myCircle" x="100" y="0" fill="blue" /&gt;
	  &lt;use href="#myCircle" x="200" y="0" fill="white" stroke="blue" /&gt;
	&lt;/svg&gt;				
				</pre>
			</div>
			<div>
				<h4 id="defs">&lt;defs&gt;</h4>
				<pre>
	&lt;svg width="300" height="100"&gt;
	  &lt;defs&gt;
	    &lt;g id="myCircle"&gt;
	      &lt;text x="25" y="20"&gt;圆形&lt;/text&gt;
	      &lt;circle cx="50" cy="50" r="20"/&gt;
	    &lt;/g&gt;
	  &lt;/defs&gt;
	
	  &lt;use href="#myCircle" x="0" y="0" /&gt;
	  &lt;use href="#myCircle" x="100" y="0" fill="blue" /&gt;
	  &lt;use href="#myCircle" x="200" y="0" fill="white" stroke="blue" /&gt;
	&lt;/svg&gt;				
				</pre>
			</div>
			<div>
				<h4 id="pattern">&lt;pattern&gt;</h4>
				<pre>
	&lt;svg width="500" height="500"&gt;
	  &lt;defs&gt;
	    &lt;pattern id="dots" x="0" y="0" width="100" height="100" patternUnits="userSpaceOnUse"&gt;
	      &lt;circle fill="#bee9e8" cx="50" cy="50" r="35" /&gt;
	    &lt;/pattern&gt;
	  &lt;/defs&gt;
	  &lt;rect x="0" y="0" width="100%" height="100%" fill="url(#dots)" /&gt;
	&lt;/svg&gt;				
				</pre>
			</div>
		</div>
	</div>
	<!--页面加载进度条-->
	<script src="https://cdn.bootcdn.net/ajax/libs/pace/0.5.0/pace.min.js"></script>
	<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.5.17/vue.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		var app = new Vue({
			el: "#app",
			data: function() {
				return {
					list: [
						{ name: "use",id: "use",explain: '用于复制一个形状'},
						{ name: "g",id: "g",explain: '将多个形状组成一个组（group），方便复用'},
						{ name: "defs",id: "defs",explain: '自定义形状，它内部的代码不会显示，仅供引用'},
						{ name: "pattern",id: "pattern",explain: '用于制作一个图案'},
					]
				}
			},
			mounted() {
			}
		})
	</script>
</body>

</html>